package com.ld.admin.util.daliySentence.impl;

import com.ld.admin.util.daliySentence.DaliySentence;
import com.ld.admin.util.daliySentence.DaliySentenceUtil;
import com.ld.admin.util.daliySentence.model.DaliySentenceModel;
import com.ld.shieldsb.common.core.util.JsoupUtil;

public class DaliySentenceLovelive implements DaliySentence {
    public static final String KEY = "tuweiqinghua";
    public static final String NAME = "土味情话";
    public static final String URL = "https://api.lovelive.tools/api/SweetNothings"; // 土味情话
    public static final String LINK_URL = "http://lovelive.tools";
    public static final String DESCRIPTION = "让大家参考一下说情话的艺术，毕竟成为一个有趣的人更能吸引他人。"; // 描述

    @Override
    public DaliySentenceModel getSentence() {
        DaliySentenceModel model = null;
        String htmlContent = null;
        String content = null;
        content = JsoupUtil.getRemoteURLText(getURL());
        if (content != null) {
            model = new DaliySentenceModel();
            htmlContent = content + DaliySentenceUtil.getLinkedStr(getLinkURL(), getName());

            model.setHtmlContent(htmlContent);
            model.setContent(content);
//            model.setOrigin("");
            model.setBaseInfo(getBaseInfo());
        }
        return model;
    }

    @Override
    public String getKey() {
        return KEY;
    }

    @Override
    public String getName() {
        return NAME;
    }

    @Override
    public String getURL() {
        return URL;
    }

    @Override
    public String getLinkURL() {
        return LINK_URL;
    }

    @Override
    public String getDescription() {
        return DESCRIPTION;
    }

}
